﻿@{
	string FlowID = Request.QueryString["flowid"];
	string StepID = Request.QueryString["stepid"];
	string GroupID = Request.QueryString["groupid"];
	string TaskID = Request.QueryString["taskid"];
	string InstanceID = Request.QueryString["instanceid"];
	string DisplayModel = Request.QueryString["display"] ?? "0";
	string DBConnID = "06075250-30dc-4d32-bf97-e922cb30fac8";
	string DBTable = "OaVehicleApplication";
	string DBTablePK = "ID";
	string DBTableTitle = "";
	if(InstanceID.IsNullOrEmpty()){InstanceID = Request.QueryString["instanceid1"];}
	YJ.Platform.Dictionary BDictionary = new YJ.Platform.Dictionary();
	YJ.Platform.WorkFlow BWorkFlow = new YJ.Platform.WorkFlow();
	YJ.Platform.WorkFlowTask BWorkFlowTask = new YJ.Platform.WorkFlowTask();
	string fieldStatus = BWorkFlow.GetFieldStatus(FlowID, StepID);
	LitJson.JsonData initData = BWorkFlow.GetFormData(DBConnID, DBTable, DBTablePK, InstanceID, fieldStatus, "{\"oavehicleapplication.startdate\":\"yyyy-MM-dd HH:mm \",\"oavehicleapplication.enddate\":\"yyyy-MM-dd HH:mm \",\"oavehicleapplication.returndate\":\"yyyy-MM-dd HH:mm \",\"oavehicleapplication.applicationdate\":\"yyyy-MM-dd HH:mm \"}");
	string TaskTitle = BWorkFlow.GetFromFieldData(initData, DBTable, DBTableTitle);
}
<link href="~/Scripts/FlowRun/Forms/flowform.css" rel="stylesheet" type="text/css" />
<script src="~/Scripts/FlowRun/Forms/common.js" type="text/javascript" ></script>
<input type="hidden" id="Form_ValidateAlertType" name="Form_ValidateAlertType" value="1" />
<input type="hidden" id="OaVehicleApplication." name="OaVehicleApplication." value="@(TaskTitle.IsNullOrEmpty() ? BWorkFlow.GetAutoTaskTitle(FlowID, StepID, Request.QueryString["groupid"]) : TaskTitle)" />
<input type="hidden" id="Form_TitleField" name="Form_TitleField" value="OaVehicleApplication." />
<input type="hidden" id="Form_DBConnID" name="Form_DBConnID" value="06075250-30dc-4d32-bf97-e922cb30fac8" />
<input type="hidden" id="Form_DBTable" name="Form_DBTable" value="OaVehicleApplication" />
<input type="hidden" id="Form_DBTablePk" name="Form_DBTablePk" value="ID" />
<input type="hidden" id="Form_DBTableTitle" name="Form_DBTableTitle" value="" />
<input type="hidden" id="Form_AutoSaveData" name="Form_AutoSaveData" value="1" />
<textarea id="Form_DBTableTitleExpression" name="Form_DBTableTitleExpression" style="display:none;width:0;height:0;"></textarea>
<script type="text/javascript">
	var initData = @Html.Raw(BWorkFlow.GetFormDataJsonString(initData));
	var fieldStatus = "1"=="@Request.QueryString["isreadonly"]" ? {} : @Html.Raw(fieldStatus);
	var displayModel = '@DisplayModel';
	$(window).load(function (){
		formrun.initData(initData, "OaVehicleApplication", fieldStatus, displayModel);
	});
</script>
<p><br/></p><p><br/></p><link href="~/Content/Theme/tablenew.css" rel="stylesheet"/><table class="flowformtable tableF table table-bordered" data-sort="sortDisabled" width="NaN" cellspacing="0" cellpadding="0" align="center"><tbody><tr class="firstRow"><th rowspan="1" colspan="2" valign="middle" align="center"><span class="title">车 辆 申 请 单<br/></span></th></tr><tr><th class="titleT" rowspan="1" colspan="2" valign="middle" align="center"><br/></th></tr><tr class="firstRow"><td class="top" rowspan="1" colspan="1"><p class="txt">分司/部门</p><input type="text" type1="flow_org" id="OaVehicleApplication.ApplicantCompany" name="OaVehicleApplication.ApplicantCompany" value="@(YJ.Platform.Users.CurrentUnitID)" style="width:55%" more="0" isflow="1" class="mymember" title="" dept="0" station="0" user="0" workgroup="0" unit="1" rootid="04f12beb-d99d-43df-ac9a-3042957d6bda"/></td><td class="top" rowspan="1" colspan="1"><p class="txt">申请人</p><input type="text" type1="flow_org" id="OaVehicleApplication.Proposer" name="OaVehicleApplication.Proposer" value="u_@YJ.Platform.Users.CurrentUserID.ToString()" more="1" isflow="1" class="mymember" title="" dept="0" station="0" user="1" workgroup="0" unit="0" rootid=""/></td></tr><tr><td rowspan="1" colspan="1"><p class="txt">驾驶人</p><input type="text" type1="flow_org" id="OaVehicleApplication.Driver" name="OaVehicleApplication.Driver" value="u_@YJ.Platform.Users.CurrentUserID.ToString()" style="width:55%" more="0" isflow="1" class="mymember" title="" dept="0" station="0" user="1" workgroup="0" unit="0" rootid=""/></td><td rowspan="1" valign="null" align="null"><p class="txt">同行人员</p><input type="text" id="OaVehicleApplication.Partner" type1="flow_text" name="OaVehicleApplication.Partner" value="" valuetype="0" isflow="1" class="mytext" title="" align="left"/></td></tr><tr><td rowspan="1" colspan="1"><p class="txt">使用开始时间</p><input type="text" type1="flow_datetime" id="OaVehicleApplication.StartDate" name="OaVehicleApplication.StartDate" value="" format="yyyy-MM-dd HH:mm " defaultvalue="" istime="1" daybefor="0" dayafter="0" currentmonth="0" isflow="1" class="mycalendar" title=""/></td><td rowspan="1" colspan="1"><p class="txt">使用结束时间</p><input type="text" type1="flow_datetime" id="OaVehicleApplication.EndDate" name="OaVehicleApplication.EndDate" value="" format="yyyy-MM-dd HH:mm " defaultvalue="" istime="1" daybefor="0" dayafter="0" currentmonth="0" isflow="1" class="mycalendar" title=""/></td></tr><tr><td rowspan="1" colspan="2"><p class="txt">事由</p><textarea isflow="1" type1="flow_textarea" id="OaVehicleApplication.Cause" name="OaVehicleApplication.Cause" class="mytext" style="width:80%; height:40px;"></textarea></td></tr><tr><td rowspan="1" colspan="1"><p class="txt">归还时间</p><input type="text" type1="flow_datetime" id="OaVehicleApplication.ReturnDate" name="OaVehicleApplication.ReturnDate" value="" format="yyyy-MM-dd HH:mm " defaultvalue="" istime="1" daybefor="0" dayafter="0" currentmonth="0" isflow="1" class="mycalendar" title=""/></td><td rowspan="1" colspan="1"><p class="txt">归还里程表数</p><input type="text" id="OaVehicleApplication.Odometer" type1="flow_text" name="OaVehicleApplication.Odometer" value="" valuetype="3" isflow="1" class="mytext" title="" align="left"/></td></tr><tr><td rowspan="2" colspan="1"><p class="txt">备注</p><input type="text" id="OaVehicleApplication.Remark" type1="flow_text" name="OaVehicleApplication.Remark" value="" style="width:100%;text-align:left;padding-right:3px;" valuetype="0" isflow="1" class="mytext" title="" align="left"/></td><td rowspan="2" colspan="1"><p class="txt">申请日期</p><input type="text" type1="flow_datetime" id="OaVehicleApplication.ApplicationDate" name="OaVehicleApplication.ApplicationDate" value="@(YJ.Utility.DateTimeNew.ShortDateTime)" format="yyyy-MM-dd HH:mm " defaultvalue="%40(YJ.Utility.DateTimeNew.ShortDateTime)" istime="1" daybefor="0" dayafter="0" currentmonth="0" isflow="1" class="mycalendar" title=""/></td></tr><tr></tr></tbody></table><p><br/></p>